libmyc.so:mymath.o mystdio.o
	gcc -shared -o $@ $^

%.o:%.c
	gcc -c -fPIC $<
# mymath.o:mymath.c
# 	gcc -c -fPIC $<
# mystdlib.o:mystdlib.c
# 	gcc -c -fPIC $<
.PHONY:output
#打包动态库
output:
	mkdir mylib/include -p
	mkdir mylib/lib -p
	cp *.h mylib/include
	cp *.so mylib/lib
	tar czf mylib.tar.gz mylib
.PHONY:clean
clean:
	rm -rf *.o
	rm -rf libmyc.so
	rm -rf mylib
	rm -rf mylib.tar.gz